package com.tfjybj.itoo.exam.provider.service;

import com.dmsdbj.itoo.tool.base.service.BaseServicePlus;
import com.github.pagehelper.PageInfo;
import com.tfjybj.itoo.exam.entity.QuestionClassifyEntity;
import com.tfjybj.itoo.exam.model.QuestionClassifyModel;

import java.util.List;


/**
 * QuestionClassifyService接口
 * questionClassify表
 *
 * @author 李青松
 * @version 2.0.0
 * @since 2.0.0 2018-11-01 08:55:53
 */
public interface QuestionClassifyService extends BaseServicePlus<QuestionClassifyEntity> {

    //region 模板生成：模糊查询

    /**
     * 根据父试题分类id模糊查询questionClassify
     *
     * @param pId      父试题分类id
     * @param pageNo   页码
     * @param pageSize 页数
     * @return 模糊查询的questionClassify
     * @author 李青松
     * @since 2.0.0 2018-11-01 08:55:53
     */
    PageInfo<QuestionClassifyEntity> queryByLikePId(String pId, Integer pageNo, Integer pageSize);
    //endregion

    /* **********************************以下为非模板生成的内容********************************* */

    List<QuestionClassifyEntity> queryClassify(String operator);

    List<QuestionClassifyEntity> queryQuestionClassify(String operator, String courseId);

    boolean createTreeModel(List<QuestionClassifyModel> questionClassifyModel);


    List<QuestionClassifyEntity> queryTreeModel(String courseId, String operator);


    List<QuestionClassifyModel> queryQuestionClassfiyByQuestiontypeid(String courseid, String questiontypeid);

    List<QuestionClassifyEntity> queryByCourseId(String courseId);

    QuestionClassifyEntity queryByCourseIdAndLevel(String courseId, String operator);

    QuestionClassifyEntity getByName(String questionClassify, String courseId, String operator);

    List<QuestionClassifyEntity> getByChapter(String chapter, String courseId);

    List<QuestionClassifyModel> queryQuestionClass(String courseId);

    List<QuestionClassifyModel> queryQuestionClassByType(String courseId, String questionTypeId);

    /**
     * 添加一条分类
     * @param questionClassifyModel
     * @author duyu
     * @since 2019年6月19日
     */
    QuestionClassifyEntity createTreeNode(QuestionClassifyModel questionClassifyModel);
}
